package cn.edu.sju;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class work03
{
    
    public static void main(String[] args)
    {
      
            String str="好好学习java";
            byte[]words=str.getBytes();
            try {
                FileOutputStream fos= new FileOutputStream("C:\\myDoc\\hello.txt");
                fos.write(words,0,words.length);
                System.out.println("hello文件已更新");
                fos.close();
                System.out.println("文思博");
            } catch (FileNotFoundException e) {
                
                e.printStackTrace();
            } catch (IOException e) {
                
                e.printStackTrace();
            }

        
    }
    
}
